package cn.pfz.Service.impl;

import cn.pfz.Service.IRolePermissionSerives;
import cn.pfz.domain.RolePermission;
import cn.pfz.mapper.RolePermissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IRolePermissionSerivesimpl implements IRolePermissionSerives {
    @Autowired
    private RolePermissionMapper rolePermissionMapper;
    @Override
    public int insert(RolePermission record) {
        return rolePermissionMapper.insert(record);
    }

    @Override
    public List<RolePermission> selectAll() {
        return rolePermissionMapper.selectAll();
    }

    @Override
    public void deleteByPermission_permission(Long id) {
        rolePermissionMapper.deleteByPermission_permission(id);
    }

    @Override
    public void deleteByPermission_role(Long id) {
        rolePermissionMapper.deleteByPermission_role(id);
    }
}
